package com.lzb.watermarkcamera.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.lzb.watermarkcamera.R;
import com.lzb.watermarkcamera.basic.ProviderMultiAdapter;
import com.lzb.watermarkcamera.bean.ScaleBean;


public class ScaleAdapter extends ProviderMultiAdapter<ScaleBean> {

    public ScaleAdapter() {
        addItemProvider(new ScaleProvider());
    }

    private class ScaleProvider extends BaseItemProvider<ScaleBean> {
        @Override
        public int getItemViewType() {
            return ProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_scale;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, ScaleBean bean) {
            baseViewHolder.setImageResource(R.id.ivScaleItemImg, bean.getImg());
        }
    }

}
